# -*- coding:utf-8 -*-
# Author:Ami
# @Time    : 2018/11/17 20:15

import time


def timer(func):
    def deco(*args, **kwargs):  # 元祖，字典
        start_time = time.time()
        func(*args, **kwargs)
        end_time = time.time()
        print("the func run time is %s" % (end_time - start_time))

    return deco


@timer  # test1 = time(test1)
def test1():
    time.sleep(3)
    print("in the test1")


@timer
def test2(name, age):
    time.sleep(4)
    print("in the test2", name, age)


# test1()

test2("adc", 233)
